import {useIntl} from "@umijs/max";

export const getText = (id: string) => {
    const intl = useIntl();
    return intl.formatMessage({id})
}

export const getLocalePrefix = (option: any) => {
    return (id: any) => getText(`${option}.${id}`);
}
